<?php

/**
 * @file
 *   Kevin Basarab resume generation
 *
 *   You can copy this file to any of the following
 *     1. A .drush folder in your HOME folder.
 *     2. Anywhere in a folder tree below an active module on your site.
 *     3. /usr/share/drush/commands (configurable)
 *     4. In an arbitrary folder specified with the --include option.
 */
 
 
function kbasarab_resume_drush_help($section) {
  switch ($section) {
    case 'drush:kbasarab-resume':
      return dt("This command will display various parts of Kevin Basarab's resume.");
  }
}

/**
 * Implementation of hook_drush_command().
 *
 * In this hook, you specify which commands your
 * drush module makes available, what it does and
 * description.
 *
 * Notice how this structure closely resembles how
 * you define menu hooks.
 *
 * @See drush_parse_command() for a list of recognized keys.
 *
 * @return
 *   An associative array describing your command(s).
 */
 
 function kbresume_drush_command() {
  $items = array();
 
  $items['kbasarab-resume'] = array(
    'description' => "View Kevin Basarab's Drupal Developer resume.",
    'arguments' => array(
      'type' => 'Which part of the resume would you like to view?',
    ),
    'aliases' => array('kb-resume'),
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, // No bootstrap at all.
    'examples' => array(
      'drush kbasarab-resume --choice=1' => 'Displays Kevin Basarab\'s contact information',
    ),
  );
 
  return $items;
}

 
/**
 * Command callback for drush kbasarab-resume
 */
function drush_kbresume_kbasarab_resume($type = NULL) {
  $types = array(
    'Contact Information' => 'kbresume_contact',
    'Work Experience' => 'kbresume_work',
    'Other Website Development' => 'kbresume_other',
    'Volunteer Work' => 'kbresume_vol',
    'Education' => 'kbresume_education',
    'Technical Experience' => 'kbresume_technical'
  );

  if ($type) {
    drush_op($types[$type]);
    drush_log(dt("'!name' displayed", array('!name' => $type)), 'success');
  }
  else {
    $choice = drush_choice($types, 'Enter a number to choose which part of Kevin Basarab\'s resume to view.', '!key');
    if ($choice !== FALSE) {
      call_user_func($types[$choice]);
      drush_log(dt("Kevin Basarab's !name displayed", array('!name' => strtolower($choice))), 'success');
    }
  }

}

function kbresume_contact() {
  $msg = "\nKevin Basarab\nDrupal Developer\nkevin@kbasarab.com\nhttp://kbasarab.com\n904.891.1804";
  drush_print("\n".dt($msg)."\n");
}
function kbresume_work() {
  $msg = <<< EOF
The Florida Times-Union/jacksonville.com
==================================================
August 2007 - Present

Digital Media Production Manager. July 2011 - Present
  -Oversee web projects for Jacksonville, Augusta and St. Augustine newspapers.
  -Ensure deliverables are outlined clearly and deadlines met.
  -Continue duties of senior web developer in addition 
   to production management.
  -Build out of 9/11 memorial project.  Drupal 7 with Omega base theme, 
   adaptive layout with views, cck modules. 
  -Work with maintaining and adding features to Drupal 6 installation of 
   jacksonville.com and other Morris Communications newspaper websites.
   Use views, CCK, panels, gmap, location and calais daily.

Digital Media Senior Web Developer: January 2010 - July 2011
  -Technical lead for code changes to core jacksonville.com product.
  -Develop custom project pages and databases providing different 
   storytelling options.
  -Provide support and guidance on website best practices.
  -Provide training to newsroom personnel.
  -Work as a liason with parent company's website development team, 
   Morris DigitalWorks. Provide support and development to sister 
   papers across the country.
  -Implementation of Subversion revision control for all local production projects.

Digital Media Innovations and Web Developer: February 2009 - January 2010
  -Technical lead for Jacksonville in redesign of jacksonville.com from 
   Drupal 5 to 6. Oversee code revisions through development, testing and production environments.
  -Drupal 6 work includes building custom views, 
   using CCK, panels, gmap, location, calais.  
  -Create and deploy custom database solutions including public employee 
   salaries and area graduates.
  -runningjacksonville.com - Broad results search of running road races.

Online Sports Editor: August 2007 - February 2009
  -schools.jacksonville.com - Created a database encompassing 
   all public schools in Florida. Includes search, FCAT data 
   and prep scores using PHP/MySQL.
  -Organized all online coverage and staff for all sports events.

SECURE-RES/Vizergy
==================================================
July 2006 - August 2007

Senior Natural Search Analyst: April 2007 - August 2007
Natural Search Technician: July 2006-April 2007
  -Performed research and development related to internet marketing, 
   search engine optimization for client sites and all minor client 
   website changes. Developed ASP based systems for press-rooms,
   call to actions and podcast management.
EOF;

  drush_print("\n".dt($msg)."\n");
}

function kbresume_other() {
  $msg = <<< EOF
-Elite Videography Inc. (Drupal) - http://elitevideography.com 
-James F. Byrnes Blown Glass-(Drupal) - http://jamesfbyrnesblownglass.com
-kBasarab.com-(Drupal) - http://kbasarab.com
-Rotaract of Florida's First Coast-(Wordpress) - http://jaxrotaract.org
EOF;

  drush_print("\n".dt($msg)."\n");
}

function kbresume_vol() {
  $msg = <<< EOF
Youth Bowling Coach
==================================================
June 2009 - present

-USBC certified level 1

Rotaract of Florida's First Coast - Division of Rotary Club
==================================================
August 2007 - August 2010

-2009/2010 - Tickets chair for annual gala.
-Elected technology chair: July 2008. Implemented Wordpress, Google Calendar,
 Flickr and Facebook for publicity of club.
EOF;

drush_print("\n".dt($msg)."\n");
}

function kbresume_education() {
$msg = <<< EOF
University of North Florida
==================================================
Bachelor of Science: Communications-Broadcast; Minor: Criminal Justice.
EOF;

drush_print("\n".dt($msg)."\n");
}

function kbresume_technical() {
  $exp = array(
    'PHP',
    'ASP',
    'MySQL',
    'Javascript',
    'jQuery',
    'AJAX',
    'HTML5/CSS3',
    'Drupal 5-7',
    'Linux',
    'LAMP',
    'SSH',
    'SVN',
    'GIT',
    'Perforce',
    'Adobe Photoshop',
    'Adobe Premiere'
  );
  $msg = null;
  natcasesort($exp);
  foreach ($exp as $x):
    $msg .= $x."\n";
  endforeach;
  
  drush_print("\n".dt($msg)."\n");
}

